<!--
 * @FilePath     : /study_code/layui/17-4.html
 * @Description  : type：组件面板选择类型
 * @Date         : 2025-04-10 08:58:02
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-10 08:58:12
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <ul>
      <li>
        <h2>date （默认）</h2>
        <input type="text" class="layui-input" id="ftest1" />
      </li>
      <li>
        <h2>year</h2>
        <input type="text" class="layui-input" id="ftest2" />
      </li>
      <li>
        <h2>month</h2>
        <input type="text" class="layui-input" id="ftest3" />
      </li>
      <li>
        <h2>time</h2>
        <input type="text" class="layui-input" id="ftest4" />
      </li>
      <li>
        <h2>datetime</h2>
        <input type="text" class="layui-input" id="ftest5" />
      </li>
    </ul>

    <script src="/layui/dist/layui.js"></script>
    <script>
      layui.use(['laydate'], function () {
        var laydate = layui.laydate

        laydate.render({
          elem: '#ftest1',
          // type: 'date',
        })

        laydate.render({
          elem: '#ftest2',
          type: 'year',
        })

        laydate.render({
          elem: '#ftest3',
          type: 'month',
        })

        laydate.render({
          elem: '#ftest4',
          type: 'time',
        })

        laydate.render({
          elem: '#ftest5',
          type: 'datetime',
        })
      })
    </script>
  </body>
</html>
